#ifndef LINES_H
#define LINES_H

#include <QWidget>
#include <QMouseEvent>
#include <QApplication>
#include <QPainter>
#include <QPixmap>
#include <QPainterPath>
#include <QTcpSocket>
#include "hraci.h"
#include "nastaveni.h"



class Papir : public QWidget
{
    Q_OBJECT
    private:
        Hraci * tabulka;
        int velikostPolicka;
        QTcpSocket * tcpClient;
    public:
        Papir(QWidget *parent = 0);
        void zapisTah(int x,int y);
        void vykresliObjekt(int x, int y);
        void vykresliKrizek(int x, int y);
        void vykresliKolecko(int x, int y);
        Hraci * vratHrace();

    protected:
        void paintEvent(QPaintEvent *event);
        void mousePressEvent(QMouseEvent * event);
    signals:
        void playerChanged(Hrac * hrac);
        void newChatMessage(QString message);
        void chatVisible(bool status);
    public slots:
        void onNewData();
        void onNewMessage(QString message);
};

#endif
